﻿using System;
using System.Collections.Generic;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using SmlEngine.UI.Screens;

namespace SmlEngine.UI.Controls
{
    /// <summary>
    /// Unfinished
    /// </summary>
    public class Button : Label
    {
        private Image image;

        public int HorizontalPadding
        {
            get { return image.Bounds.Location.X - base.Bounds.Location.X; }
        }

        public int VerticalPadding
        {
            get { return image.Bounds.Location.Y - base.Bounds.Location.Y; }
        }

        public Texture2D Texture
        {
            get { return image.Texture; }
            set { image.Texture = value; }
        }

        public override Rectangle Bounds
        {
            get { return image.Bounds; }
            set
            {
                base.Bounds = value;
                image.Bounds = value;
            }
        }

        public Button(Screen screen, Texture2D texture, string text)
            : base(screen, text)
        {
            image.Texture = texture;
            Children.Add(image);
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch, Point offset)
        {
            base.Draw(gameTime, spriteBatch);
        }
    }
}
